//package com.zzuli.ylsystem.quartz;
//
//import com.zzuli.ylsystem.dao.UserDao;
//import org.quartz.Job;
//import org.quartz.JobExecutionContext;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import java.text.DateFormat;
//import java.text.SimpleDateFormat;
//import java.util.Date;
//
//public class UserDayAddJob implements Job {
//    private static final Logger logger = LoggerFactory.getLogger(UserDayAddJob.class);
//
//    @Autowired
//    private UserDao userDao;
//
//    @Override
//    public void execute(JobExecutionContext context) {
//        logger.info("[用户患病天数加一任务开始]");
//        this.userAddDay();
//        logger.info("[用户患病天数加一任务结束]");
//    }
//
//    private void userAddDay() {
//        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
//        String time = df.format(new Date());
//
//        int rwNum = workerService.selectRWNum();
//        int rwlcNum = workerService.selectRWLCNum();
//
//        //高风险点位数量
//        int hfxnum = workerService.selectHfxNum();
//        //中风险点位数量
//        int zfxnum = workerService.selectZfxNum();
//        //低风险点位数量
//        int dfxnum = workerService.selectDfxNum();
//
//        Integer id = workerService.selectRWReport(time);
//        if (null == id){
//            workerService.addRWTJ(rwNum,rwlcNum,time,hfxnum,zfxnum,dfxnum);
//        }else {
//            workerService.updateRWTJ(id,rwlcNum,hfxnum,zfxnum,dfxnum);
//        }
//    }
//}
